-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(import): preserve workflow colors during import #3130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR fixes workflow color preservation during import by passing the color directly to the workflow creation API instead of using a separate PATCH request afterward. Changes:
Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ImportHook as useImportWorkflow
participant CreateMutation as createWorkflowMutation
participant API as /api/workflows
participant StateAPI as /api/workflows/{id}/state
User->>ImportHook: Import workflow file
ImportHook->>ImportHook: Parse workflow JSON
ImportHook->>ImportHook: Extract color from metadata
Note over ImportHook: Before: color passed via PATCH<br/>After: color passed directly
ImportHook->>CreateMutation: mutateAsync({color, ...})
CreateMutation->>API: POST /api/workflows<br/>{name, color, workspaceId, ...}
API-->>CreateMutation: {id, name, color, ...}
CreateMutation-->>ImportHook: result with workflow id
rect rgb(240, 255, 240)
Note over ImportHook: Removed: PATCH call<br/>if color !== '#3972F6'
end
ImportHook->>StateAPI: PUT /api/workflows/{id}/state
StateAPI-->>ImportHook: Success
ImportHook-->>User: Workflow imported with correct color
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Type of Change
Testing
Tested manually
Checklist